//
//  YLSecurityPasswordViewModel.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/2.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLSecurityPasswordViewModel.h"

@implementation YLSecurityPasswordViewModel
- (instancetype)init
{
    if (self = [super init]) {
        [self setUp];
    }
    return self;
}

- (void)setUp
{
    _sureEnableSiganl = [RACSignal combineLatest:@[RACObserve(self, code), RACObserve(self, password), RACObserve(self, surePassword)] reduce:^id _Nullable(NSString *code, NSString *password, NSString *surePassword){
        return @(code.length && password.length && surePassword.length);
    }];
    
    
//    _loginCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
//        return [RACSignal createSignal:^RACDisposable * _Nullable(id<RACSubscriber>  _Nonnull subscriber) {
//            [WHProgressHUD showError:@"账号或密码错误"];
//            [subscriber sendNext:@"11"];
//            [subscriber sendCompleted];
//            return nil;
//        }];
//    }];
//    
//    _otherLoginSubject = [RACSubject subject];
//    _registerSubject = [RACSubject subject];
}

@end
